<%@page import="br.com.Modelo.UsuarioCliente"%>
<%@page import="br.com.Modelo.UsuarioComerciante"%>
<%@page import="br.com.Dao.UsuarioClienteDao"%>
<%@page import="br.com.Dao.UsuarioComercianteDao"%>
<%@page import="java.io.IOException"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mercado Catalão</title>
<!-- Bootstrap Core CSS -->
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<style type="text/css">
.topo {
	width: 100%;
	height: 100px;
	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.1, #223D62),
		color-stop(1, #152840));
	background-image: -o-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: -moz-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: -webkit-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: -ms-linear-gradient(bottom, #223D62 10%, #152840 100%);
	background-image: linear-gradient(to bottom, #223D62 10%, #152840 100%);
}

.logo {
	background-image: url(img/logo.png);
	width: 172px;
	height: 100px;
}

body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

input, textarea, button { }

/* Required field START */

.required-field-block {
    position: relative;   
}

.required-field-block .required-icon {
    display: inline-block;
    vertical-align: middle;
    margin: -0.25em 0.25em 0em;
    background-color: #E8E8E8;
    border-color: #E8E8E8;
    padding: 0.5em 0.8em;
    color: rgba(0, 0, 0, 0.65);
    text-transform: uppercase;
    font-weight: normal;
    border-radius: 0.325em;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: background 0.1s linear;
    -moz-transition: background 0.1s linear;
    transition: background 0.1s linear;
    font-size: 75%;
}
	
.required-field-block .required-icon {
    background-color: transparent;
    position: absolute;
    top: 0em;
    right: 0em;
    z-index: 10;
    margin: 0em;
    width: 30px;
    height: 30px;
    padding: 0em;
    text-align: center;
    -webkit-transition: color 0.2s ease;
    -moz-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.required-field-block .required-icon:after {
    position: absolute;
    content: "";
    right: 1px;
    top: 1px;
    z-index: -1;
    width: 0em;
    height: 0em;
    border-top: 0em solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-left: 0em solid transparent;
    border-right-color: inherit;
    -webkit-transition: border-color 0.2s ease;
    -moz-transition: border-color 0.2s ease;
    transition: border-color 0.2s ease;
}

.required-field-block .required-icon .text {
	color: #B80000;
	font-size: 26px;
	margin: -3px 0 0 12px;
}
/* Required field END */
</style>
</head>

<%@ include file="topo.jsp"%>

<%
	//allow access only if session exists
	String[] id= (String[]) session.getAttribute("user");
	UsuarioCliente userCliente = null;
	UsuarioComerciante userComerciante = null;
	UsuarioClienteDao dao = new UsuarioClienteDao();
	UsuarioComercianteDao dao1 = new UsuarioComercianteDao();
	if(id != null){
	//	out.print(id[0]+"->"+id[1]);
		if(id[1].equals("1")){
		
			userCliente = dao.validaAutenticacaoUser(Long.parseLong(id[0]), Integer.parseInt(id[1]));
		
		}else{
			
			userComerciante = dao1.validaAutenticacaoUser(Long.parseLong(id[0]), Integer.parseInt(id[1]));
		}
	}
	String userName = null;
	String sessionID = null;
	Cookie[] cookies = request.getCookies();
	if(cookies !=null){
	for(Cookie cookie : cookies){
		if(cookie.getName().equals("user")) userName = cookie.getValue();
		if(cookie.getName().equals("JSESSIONID")) sessionID = cookie.getValue();
	}
}
	if(userCliente != null || userComerciante != null){
		if(userCliente == null){
			 // out.print("Login : "+userComerciante.getLogin());
		}else{
		//	out.print("Login : "+userCliente.getLogin());			
		}
			
	}
%>


<%@ include file="menu.jsp"%>


<!-- estrutura -->
<div class="row">

<div class="container">

    <form role="form" style="width:400px; margin: 0 auto;" action="fale_conosco">
        <h1>Fale conosco</h1>
        <hr class="prettyline">
        <div class="required-field-block">
            <input type="text" placeholder="Nome" class="form-control">
            <div class="required-icon">
                <div class="text">*</div>
            </div>
        </div>
        <br/>
        
        <div class="required-field-block">
            <input type="text" placeholder="Email" class="form-control">
            <div class="required-icon">
                <div class="text">*</div>
            </div>
        </div>
        <br/>
        <input type="text" placeholder="Telefone" class="form-control">
           <br/>
        <div class="required-field-block">
            <textarea rows="3" class="form-control" placeholder="Menssagem"></textarea>
            <div class="required-icon">
                <div class="text">*</div>
            </div>
        </div>
        <br/>
        <button class="btn btn-primary">Enviar</button>
    </form>
    <hr class="prettyline">
</div>
	
</div>



<!-- jQuery Version 1.11.0 -->
	<script src="/plataforma_marketing/bootstrap/js/jquery-1.11.0.js"></script>
	<script src="/plataforma_marketing/bootstrap/js/bootstrap.js"></script>



</body>
</html>






